﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Report_SalesLink_Detail.aspx.cs"
    Inherits="EcSalseManage.EcSalse.Report_SalesLink_Detail" %>

<%@ Register Src="../PageCommon/Report_Tab.ascx" TagName="Report_Tab" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>项目销售管理系统-联动成交</title>
    <script language="javascript" type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>

    <script language="javascript" type="text/javascript" src="../js/jquery-1.6.2.min.js"></script>

    <link href="../css/skin.css" type="text/css" rel="stylesheet">
    <script type="text/javascript">
        function test() {


            if (checkFujian()==true) {

                if (document.all.ddlFileType.value == "") {
                    alert("请选择附件类型！");
                    return false;
                }
                if (document.getElementById("txtFilePath").value == "") {
                    alert("项目附件不能为空！");
                    return false;
                }

            }
        }
        function checkUpload() {
            if (document.all.ddlFileType.value == "") {
                alert("请选择附件类型！");
                return false;
            }
            if (document.getElementById("txtFilePath").value == "") {
                alert("项目附件不能为空！");
                return false;
            }
        }
        var Actualindex = 2;
        function AddArea_ActualCollection() {
            var div = document.createElement("div");
            div.innerHTML = " 实付款（金额）<input type='text' name='ActualCollection1'  style='width:50px;' /> &nbsp;&nbsp;&nbsp;&nbsp;日期<input type='text' id=\"ActualCollection" + (Actualindex + 1) + "\" class=\"Wdate\" onFocus=\"var data=document.getElementById(\'ActualCollection" + Actualindex + "\').value;WdatePicker({minDate:data})\"  name='ActualCollection2' /> <input type='button' value='删除' onclick='DelArea(\"ActualCollectionArea\",this.parentNode)'/>";
            document.getElementById("ActualCollectionArea").appendChild(div);
            Actualindex += 1;
        }
        
        var Contractindex = 2;
        function AddArea_ContractInstallments() {
            var div = document.createElement("div");
            div.innerHTML = "分期付款（金额）<input type='text' name='ContractInstallments1'  style='width:50px;' /> &nbsp;&nbsp;&nbsp;&nbsp;约定日期<input type='text' class=\"Wdate\" id=\"ContractInstallments" + (Contractindex + 1) + "\" onFocus=\"var data=document.getElementById(\'ContractInstallments" + Contractindex + "\').value;WdatePicker({minDate:data})\" name='ContractInstallments2' /> <input type='button' value='删除' onclick='DelArea(\"ContractInstallmentsArea\",this.parentNode)'/>";
            document.getElementById("ContractInstallmentsArea").appendChild(div);
            Contractindex += 1;
        }
        
        function DelArea(area, obje) {
            document.getElementById(area).removeChild(obje);
            if (area == "ActualCollectionArea")
                Actualindex--;
            else if (area == "ContractInstallmentsArea")
                Contractindex--;
        }
        function DataCheck() {

            var ContractInstallments1 = document.getElementsByName("ContractInstallments1");
            var ContractInstallments2 = document.getElementsByName("ContractInstallments2");
            for (var i = 0; i < ContractInstallments1.length; i++) {
                if (ContractInstallments1[i].value == "" || ContractInstallments2[i].value == "") {
                    alert("分期付款内容不能为空");
                    return false;
                }
                document.getElementById("hfldContractInstallments").value += ContractInstallments1[i].value + "," + ContractInstallments2[i].value + "|";
            }

            var ActualCollection1 = document.getElementsByName("ActualCollection1");
            var ActualCollection2 = document.getElementsByName("ActualCollection2");
            for (var i = 0; i < ActualCollection1.length; i++) {
                if (ActualCollection1[i].value == "" || ActualCollection2[i].value == "") {
                    alert("实付款内容不能为空");
                    return false;
                }
                document.getElementById("hfldActualCollection").value += ActualCollection1[i].value + "," + ActualCollection2[i].value + "|";
            }

            if (checkFujian() == true) {
                if (document.all.ddlFileType.value == "") {
                    alert("请选择附件类型！");
                    return false;
                }
                if (document.getElementById("txtFilePath").value == "") {
                    alert("项目附件不能为空！");
                    return false;
                }
            }
        }

        function checkFujian() {
            var ar = document.getElementsByTagName("a");
            for (var i = 0; i < ar.length; i++) {
                var temp = ar[i].href;
                if (temp.indexOf("gzs-ecc02", 0) > 0) {
                    return false;
                }
            }
            return true;
        }
        

        function TotalReceipt() {
            var ActualCollection1 = document.getElementsByName("ActualCollection1");
            var total = 0;
            for (var i = 0; i < ActualCollection1.length; i++) {
                total += parseFloat(ActualCollection1[i].value);
            }
            document.getElementById("txtReport_SalesLink_TotalReceipt").value = total;
        }

        function RestHouse() {
            var price = document.getElementById("txtReport_SalesLink_ContractSumPrice").value - document.getElementById("txtReport_SalesLink_TotalReceipt").value;
            document.getElementById("txtReport_SalesLink_RestHouse").value = price;
        }


        function addRow() {
            var FilePath = document.getElementById("txtFilePath");
            if (FilePath.value == "") {
                alert("请选择上传文件");
                return false;
            }

            var objMyTable = document.getElementById("tempTable");
            objMyTable.style.display = "block";
            var index = objMyTable.rows.length;
            var nextRow = objMyTable.insertRow(index);
            nextRow.setAttribute("style", "background-color:rgb(248, 244, 228)");

            var newCellCartonNo1 = nextRow.insertCell();
            var obj = document.getElementById("ddlFileType");
            var n = obj.selectedIndex;
            newCellCartonNo1.innerHTML = obj.options[n].text;

            document.getElementById("HiddenField1").value += "" + obj.options[n].value + "," + document.getElementById("txtFilePath").value + "," + document.getElementById("txtProjectDesc").value + "|";

            var newCellCartonNo4 = nextRow.insertCell();
            newCellCartonNo4.innerHTML = "<input style='border-width: 0px; border-style: dotted;'  onclick='deleteRow(" + index + ")'   src='..../images/delete.gif' type='image'>";
        }

        function deleteRow(obj) {

            var temp = document.getElementById("HiddenField1").value;

            temp = temp.substring(0, temp.length - 1);

            var arrayObj = temp.split("|");
            arrayObj.splice(obj - 1, 1);
            temp = "";
            for (i = 0; i < arrayObj.length; i++) {
                temp += arrayObj[i] + "|";
            }
            document.getElementById("HiddenField1").value = temp;

            document.getElementById("tempTable").deleteRow(obj);
        }
    </script>

    <style type="text/css">
        p.p0
        {
            margin: 0pt;
            margin-bottom: 0.0001pt;
            margin-bottom: 0pt;
            margin-top: 0pt;
            text-align: justify;
            font-size: 10.5000pt;
            font-family: 'Calibri';
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td width="17" valign="top" background="../images/mail_leftbg.gif">
                <img src="../images/left-top-right.gif" width="17" height="29" />
            </td>
            <td valign="top" background="../images/content-bg.gif">
                <uc1:Report_Tab ID="Report_Tab1" runat="server" Visible="False" ExchangeTypeID="1" />
            </td>
            <td width="16" valign="top" background="../images/mail_rightbg.gif">
                <img src="../images/nav-right-bg.gif" width="16" height="29" />
            </td>
        </tr>
        <tr>
            <td valign="middle" background="../images/mail_leftbg.gif">
                &nbsp;
            </td>
            <td valign="top" bgcolor="#F7F8F9">
                <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td colspan="4" valign="top">
                            <!-- 内容区域 -->
                            <center>
                                <table>
                                 <tr>
                                   <td align="left" colspan="4" >
                                           <p>
                                          项目名称：<asp:Label ID="lblProjectName" runat="server" Text=""></asp:Label></p>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="center" colspan="4" style="border-bottom:1px solid #cccccc;"><span id="lblTitle" style="font-size:28px;">销售成交-联动</span><br /><br /></td>
                                </tr>
                                    <tr>
                                        <td colspan="4">&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td>
                                            成交编号
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_ReportNO" runat="server"></asp:TextBox>
                                             <asp:RequiredFieldValidator ErrorMessage="成交编号不能为空" ControlToValidate="txtReport_SalesLink_ReportNO" Display="None" ID="RequiredFieldValidator1" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            日期
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_ExchangeDate" class="Wdate" onclick="WdatePicker({dateFmt:'yyyy/MM/dd'})"
                                                runat="server"></asp:TextBox>
                                                 <asp:RequiredFieldValidator ErrorMessage="日期不能为空" ControlToValidate="txtReport_SalesLink_ExchangeDate" Display="None" ID="RequiredFieldValidator2" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            物业类型
                                        </td>
                                        <td>
                                            <asp:RadioButtonList ID="radlPropertyType" RepeatDirection="Horizontal" runat="server">
                                            </asp:RadioButtonList>
                                        </td>
                                        <td>
                                            认购书
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_Subscribe" runat="server"></asp:TextBox>
                                             <asp:RequiredFieldValidator ErrorMessage="认购书不能为空" ControlToValidate="txtReport_SalesLink_Subscribe" Display="None" ID="RequiredFieldValidator3" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            经办人
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_Operator" runat="server"></asp:TextBox>
                                             <asp:RequiredFieldValidator ErrorMessage="经办人不能为空" ControlToValidate="txtReport_SalesLink_Operator" Display="None" ID="RequiredFieldValidator4" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            物业地址
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_SellUnit" runat="server"></asp:TextBox>
                                             <asp:RequiredFieldValidator ErrorMessage="物业地址不能为空" ControlToValidate="txtReport_SalesLink_SellUnit" Display="None" ID="RequiredFieldValidator5" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            客户姓名
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_Buyer" runat="server"></asp:TextBox>
                                             <asp:RequiredFieldValidator ErrorMessage="客户姓名不能为空" ControlToValidate="txtReport_SalesLink_Buyer" Display="None" ID="RequiredFieldValidator6" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            购房面积
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_Area" runat="server"></asp:TextBox>
                                             <asp:RequiredFieldValidator ErrorMessage="购房面积不能为空" ControlToValidate="txtReport_SalesLink_Area" Display="None" ID="RequiredFieldValidator7" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            折扣
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_Discount" runat="server"></asp:TextBox>
                                             <asp:RequiredFieldValidator ErrorMessage="折扣不能为空" ControlToValidate="txtReport_SalesLink_Discount" Display="None" ID="RequiredFieldValidator8" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            付款方式
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="dropReport_SalesLink_PayType" runat="server">
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            原总价
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_Price" runat="server"></asp:TextBox>
                                             <asp:RequiredFieldValidator ErrorMessage="原总价不能为空" ControlToValidate="txtReport_SalesLink_Price" Display="None" ID="RequiredFieldValidator9" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            已付定金
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_Margins" runat="server"></asp:TextBox>
                                             <asp:RequiredFieldValidator ErrorMessage="已付定金不能为空" ControlToValidate="txtReport_SalesLink_Margins" Display="None" ID="RequiredFieldValidator10" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            代理费
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_AgencyCost" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="代理费不能为空" ControlToValidate="txtReport_SalesLink_AgencyCost" Display="None" ID="RequiredFieldValidator11" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            挞订佣
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_CancelComm" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="挞订佣不能为空" ControlToValidate="txtReport_SalesLink_CancelComm" Display="None" ID="RequiredFieldValidator12" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            原面积
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_OriginalArea" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="原面积不能为空" ControlToValidate="txtReport_SalesLink_OriginalArea" Display="None" ID="RequiredFieldValidator13" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            原成交价
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_OriginalPrice" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="原成交价不能为空" ControlToValidate="txtReport_SalesLink_OriginalPrice" Display="None" ID="RequiredFieldValidator14" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            合作分行和营业员
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_BarchSalse" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="合作分行和营业员不能为空" ControlToValidate="txtReport_SalesLink_BarchSalse" Display="None" ID="RequiredFieldValidator15" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            联动部门
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_Departments" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="联动部门不能为空" ControlToValidate="txtReport_SalesLink_Departments" Display="None" ID="RequiredFieldValidator16" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            联动所属分行
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_Branches" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="联动所属分行不能为空" ControlToValidate="txtReport_SalesLink_Branches" Display="None" ID="RequiredFieldValidator17" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            业务员姓名（联动）
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_SalesNames" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="业务员姓名（联动）不能为空" ControlToValidate="txtReport_SalesLink_SalesNames" Display="None" ID="RequiredFieldValidator18" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            业务员工号
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_SalesNumber" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="业务员工号不能为空" ControlToValidate="txtReport_SalesLink_SalesNumber" Display="None" ID="RequiredFieldValidator19" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td colspan="2">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            户型
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_Variations" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="户型不能为空" ControlToValidate="txtReport_SalesLink_Variations" Display="None" ID="RequiredFieldValidator20" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            身份证号码
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_IDNumber" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="身份证号码不能为空" ControlToValidate="txtReport_SalesLink_IDNumber" Display="None" ID="RequiredFieldValidator21" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            电话
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_Tel" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="电话不能为空" ControlToValidate="txtReport_SalesLink_Tel" Display="None" ID="RequiredFieldValidator22" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            客户联系地址
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_CustomerAddress" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="客户联系地址不能为空" ControlToValidate="txtReport_SalesLink_CustomerAddress" Display="None" ID="RequiredFieldValidator23" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            邮编
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_PostCode" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="邮编不能为空" ControlToValidate="txtReport_SalesLink_PostCode" Display="None" ID="RequiredFieldValidator24" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            预售面积
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_SalesArea" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="预售面积不能为空" ControlToValidate="txtReport_SalesLink_SalesArea" Display="None" ID="RequiredFieldValidator25" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            原成交单价
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_OriginalContractPrice" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="原成交单价不能为空" ControlToValidate="txtReport_SalesLink_OriginalContractPrice" Display="None" ID="RequiredFieldValidator26" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            大定日期
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_BigDate" class="Wdate" onclick="WdatePicker({dateFmt:'yyyy/MM/dd'})"
                                                runat="server"></asp:TextBox>
                                                  <asp:RequiredFieldValidator ErrorMessage="大定日期不能为空" ControlToValidate="txtReport_SalesLink_BigDate" Display="None" ID="RequiredFieldValidator27" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            大定单价
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_BigPrice" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="大定单价不能为空" ControlToValidate="txtReport_SalesLink_BigPrice" Display="None" ID="RequiredFieldValidator28" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            大定总价
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_BigSumPrice" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="大定总价不能为空" ControlToValidate="txtReport_SalesLink_BigSumPrice" Display="None" ID="RequiredFieldValidator29" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            签约日期
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_ContractDate" class="Wdate" onclick="WdatePicker({dateFmt:'yyyy/MM/dd'})"
                                                runat="server"></asp:TextBox>
                                                  <asp:RequiredFieldValidator ErrorMessage="签约日期不能为空" ControlToValidate="txtReport_SalesLink_ContractDate" Display="None" ID="RequiredFieldValidator30" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            签约面积
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_ContractArea" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="签约面积不能为空" ControlToValidate="txtReport_SalesLink_ContractArea" Display="None" ID="RequiredFieldValidator31" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            签约单价
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_ContractPrice" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="签约单价不能为空" ControlToValidate="txtReport_SalesLink_ContractPrice" Display="None" ID="RequiredFieldValidator32" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            签约总价
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_ContractSumPrice" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="签约总价不能为空" ControlToValidate="txtReport_SalesLink_ContractSumPrice" Display="None" ID="RequiredFieldValidator33" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            贷款金额
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_LoanAmount" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="贷款金额不能为空" ControlToValidate="txtReport_SalesLink_LoanAmount" Display="None" ID="RequiredFieldValidator34" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            约定放款日期
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_ContractLoansDate" class="Wdate" onclick="WdatePicker({dateFmt:'yyyy/MM/dd'})"
                                                runat="server"></asp:TextBox>
                                                  <asp:RequiredFieldValidator ErrorMessage="约定放款日期不能为空" ControlToValidate="txtReport_SalesLink_ContractLoansDate" Display="None" ID="RequiredFieldValidator35" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            放贷日期
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_LentDate" class="Wdate" onclick="WdatePicker({dateFmt:'yyyy/MM/dd'})"
                                                runat="server"></asp:TextBox>
                                                  <asp:RequiredFieldValidator ErrorMessage="放贷日期不能为空" ControlToValidate="txtReport_SalesLink_LentDate" Display="None" ID="RequiredFieldValidator36" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            放贷金额
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_LentAmount" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="放贷金额不能为空" ControlToValidate="txtReport_SalesLink_LentAmount" Display="None" ID="RequiredFieldValidator37" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td valign="top">
                                            合同约定分期付款
                                        </td>
                                        <td colspan="3" class="page">
                                            分期付款（金额）<input name="ContractInstallments1" style="width: 50px;" id="ContractInstallments1"
                                                type="text" />&nbsp;&nbsp;&nbsp;&nbsp;约定日期<input type="text" name="ContractInstallments2"
                                                    id="ContractInstallments2" class="Wdate" onclick="WdatePicker({dateFmt:'yyyy/MM/dd'})" />
                                            <input type="button" onclick="AddArea_ContractInstallments()" value="增加" />
                                            <div id="ContractInstallmentsArea">
                                            </div>
                                            <asp:HiddenField ID="hfldContractInstallments" runat="server" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td valign="top">
                                            实收款
                                        </td>
                                        <td colspan="3" class="page">
                                            实付款（金额）<input name="ActualCollection1" id="ActualCollection1" style="width: 50px;"
                                                type="text" />
                                            &nbsp;&nbsp;&nbsp;&nbsp;日期<input type="text" name="ActualCollection2" id="ActualCollection2"
                                                class="Wdate" onclick="WdatePicker({dateFmt:'yyyy/MM/dd'})" />
                                            <input type="button" onclick="AddArea_ActualCollection()" value="增加" />
                                            <div id="ActualCollectionArea">
                                            </div>
                                            <asp:HiddenField ID="hfldActualCollection" runat="server" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            合计收款
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_TotalReceipt" onclick="TotalReceipt()" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="合计收款不能为空" ControlToValidate="txtReport_SalesLink_TotalReceipt" Display="None" ID="RequiredFieldValidator38" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            剩余房款
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_RestHouse" onclick="RestHouse()" runat="server"></asp:TextBox>
                                              <asp:RequiredFieldValidator ErrorMessage="剩余房款不能为空" ControlToValidate="txtReport_SalesLink_RestHouse" Display="None" ID="RequiredFieldValidator39" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            交房日期
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtReport_SalesLink_GiveHouseDate" class="Wdate" onclick="WdatePicker({dateFmt:'yyyy/MM/dd'})"
                                                runat="server"></asp:TextBox>
                                                  <asp:RequiredFieldValidator ErrorMessage="交房日期不能为空" ControlToValidate="txtReport_SalesLink_GiveHouseDate" Display="None" ID="RequiredFieldValidator40" runat="server" ></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <asp:ScriptManager ID="ScriptManager1" runat="server">
                                    </asp:ScriptManager>
                                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                    <ContentTemplate>
                                    <tr>
                                        <td colspan="4">
                                            <table class="page" style="width: 100%;">
                                                <tr>
                                                    <td>
                                                        附件类型：
                                                    </td>
                                                    <td colspan="3" align="left">
                                                        <asp:DropDownList ID="ddlFileType" runat="server">
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="left" style="font-size: 15px;">
                                                        上传文件:
                                                    </td>
                                                    <td align="left" colspan="3">
                                                        <font face="宋体">
                                                            <input id="txtFilePath" runat="server" name="UploadFile" style="font-size: 9pt; width: 388px"
                                                                type="file" />
                                                        </font>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="left" style="font-size: 15px;">
                                                        其他资料:
                                                    </td>
                                                    <td align="left" colspan="3">
                                                        <font face="宋体">
                                                            <asp:TextBox ID="txtProjectDesc" runat="server" Width="384px"></asp:TextBox></font>
                                                        <asp:Button ID="btnUpLoad" Style="background-image: url(../images/pic15.gif); border-color: #ffffff;
                                                            background-repeat: no-repeat; padding-left: 17px;" runat="server" Visible="false"
                                                            Text="上传" OnClick="btnUpLoad_Click" />
                                                        <asp:HiddenField ID="HiddenField1" runat="server" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td colspan="3" align="left">
                                            <table id="tempTable" style="display: none; border-width: 0px; border-style: dotted;
                                                width: 600px; background-color: rgb(192, 255, 192);" border="0" rules="all" cellspacing="1"
                                                cellpadding="1">
                                                <tr style="background-color: rgb(216, 200, 168);" class="ttTable" align="center">
                                                    <td>
                                                        上传资料名称
                                                    </td>
                                                    <td style="width: 40px;">
                                                        删除
                                                    </td>
                                                </tr>
                                            </table>
                                            <asp:DataGrid ID="dgList" Visible="false" runat="server" AutoGenerateColumns="False"
                                                BackColor="#C0FFC0" BorderStyle="Dotted" BorderWidth="0px" CellPadding="1" CellSpacing="1"
                                                DataKeyField="Project_Report_ID" PageSize="20" Width="600px" OnItemCommand="dgList_ItemCommand"
                                                OnItemDataBound="dgList_ItemDataBound">
                                                <PagerStyle Mode="NumericPages" Position="TopAndBottom" />
                                                <AlternatingItemStyle BackColor="#F0F0E8" CssClass="td" />
                                                <ItemStyle BackColor="#F8F4E4" CssClass="td" />
                                                <HeaderStyle BackColor="#D8C8A8" CssClass="ttTable" HorizontalAlign="Center" />
                                                <Columns>
                                                    <asp:HyperLinkColumn DataNavigateUrlField="Project_Report_FilePath" DataTextField="Report_File_Name"
                                                        HeaderText="上传资料名称" Target="_blank"></asp:HyperLinkColumn>
                                                    <asp:TemplateColumn HeaderText="删除">
                                                        <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                            Font-Underline="False" HorizontalAlign="Center" Wrap="False" />
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="imgbtnDelete" runat="server" AlternateText="删除" BorderStyle="Dotted"
                                                                BorderWidth="0px" CommandName="Delete" ImageAlign="Middle" ImageUrl="../images/delete.gif" />
                                                        </ItemTemplate>
                                                        <HeaderStyle Width="40px" />
                                                    </asp:TemplateColumn>
                                                </Columns>
                                            </asp:DataGrid>
                                        </td>
                                    </tr>
                                    
                                          </ContentTemplate>
                                    </asp:UpdatePanel>
                                    <tr>
                                        <td colspan="4" align="center">
                                            <asp:Button ID="btnSubmit" runat="server" Text="保存"  CausesValidation="false"  OnClick="btnSubmit_Click" />
                                            <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="true" ShowSummary="false" />
                                            &nbsp;&nbsp;&nbsp;&nbsp;
                                            <input id="btnReset" type="reset"  value="重置" runat="server" />
                                            <asp:Button ID="btnDelete" Visible="false"  OnClientClick="return confirm('确认删除吗？')" runat="server" Text="删除"   onclick="btnDelete_Click" />
                                            &nbsp;&nbsp;&nbsp;&nbsp;
                                            <asp:Button ID="btnAudit" runat="server" Text="项经审核" OnClientClick="return confirm('是否确定审核通过？')" onclick="btnAudit_Click" />
              
                                        </td>
                                    </tr>
                                </table>
                            </center>
                            <!-- 内容区域 END -->
                        </td>
                    </tr>
                    <tr>
                        <td height="40" colspan="4">
                            <table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
                                <tr>
                                    <td>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td width="2%">
                            &nbsp;
                        </td>
                        <td width="51%" class="left_txt">
                            <img src="../images/icon-mail2.gif" width="16" height="11">
                            客户服务邮箱：servers@centaline.com<br>
                            <img src="../images/icon-phone.gif" width="17" height="14">
                            官方网站：http://www.centaline.com.cn/
                        </td>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                </table>
            </td>
            <td background="../images/mail_rightbg.gif">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td valign="bottom" background="../images/mail_leftbg.gif">
                <img src="../images/buttom_left2.gif" width="17" height="17" />
            </td>
            <td background="../images/buttom_bgs.gif">
                <img src="../images/buttom_bgs.gif" width="17" height="17">
            </td>
            <td valign="bottom" background="../images/mail_rightbg.gif">
                <img src="../images/buttom_right2.gif" width="16" height="17" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
